package com.toKnow.model.vo;

import com.toKnow.model.entity.Source;

import java.util.Date;

public class SourceAbstractVo {
    private Integer source_id;
    private String title;
    private Integer author_id;
    private String author_name;
    private String avatar;
    private Date upload_date;
    private Integer like_times;
    private Integer download_times;
    private Integer comment_times;
    private Integer collect_times;
    private String digest;
    private String cover;
    private String source_name;

    @Override
    public String toString() {
        return "SourceAbstractVo{" +
                "id=" + source_id +
                ", title='" + title + '\'' +
                ", author_id=" + author_id +
                ", author_name='" + author_name + '\'' +
                ", upload_date=" + upload_date +
                ", like_times=" + like_times +
                ", download_times=" + download_times +
                ", comment_times=" + comment_times +
                ", collect_times=" + collect_times +
                ", digest='" + digest + '\'' +
                ", cover='" + cover + '\'' +
                ", source_name='" + source_name + '\'' +
                '}';
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getSource_id() {
        return source_id;
    }

    public void setSource_id(Integer id) {
        this.source_id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getAuthor_id() {
        return author_id;
    }

    public void setAuthor_id(Integer author_id) {
        this.author_id = author_id;
    }

    public String getAuthor_name() {
        return author_name;
    }

    public void setAuthor_name(String author_name) {
        this.author_name = author_name;
    }

    public Date getUpload_date() {
        return upload_date;
    }

    public void setUpload_date(Date upload_date) {
        this.upload_date = upload_date;
    }

    public Integer getLike_times() {
        return like_times;
    }

    public void setLike_times(Integer like_times) {
        this.like_times = like_times;
    }

    public Integer getDownload_times() {
        return download_times;
    }

    public void setDownload_times(Integer download_times) {
        this.download_times = download_times;
    }

    public Integer getComment_times() {
        return comment_times;
    }

    public void setComment_times(Integer comment_times) {
        this.comment_times = comment_times;
    }

    public Integer getCollect_times() {
        return collect_times;
    }

    public void setCollect_times(Integer collect_times) {
        this.collect_times = collect_times;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getSource_name() {
        return source_name;
    }

    public void setSource_name(String source_name) {
        this.source_name = source_name;
    }

    public SourceAbstractVo() {
    }

    public SourceAbstractVo(Integer id, String title, Integer author_id, String author_name, Date upload_date, Integer like_times, Integer comment_times, Integer collect_times, String digest, String cover, String source_name) {
        this.source_id = id;
        this.title = title;
        this.author_id = author_id;
        this.author_name = author_name;
        this.upload_date = upload_date;
        this.like_times = like_times;
        this.comment_times = comment_times;
        this.collect_times = collect_times;
        this.digest = digest;
        this.cover = cover;
        this.source_name = source_name;
    }

    public SourceAbstractVo(Source source){
        this.source_id=source.getId();
        this.title = source.getTitle();
        this.author_id=source.getAuthorId();
        this.author_name = source.getAuthorName();
        this.upload_date = source.getPublishDate();
        this.digest = source.getDigest();
        this.cover = source.getCover();
        this.source_name = source.getSourceName();
        this.like_times=source.getLikeNumber();
        this.download_times = source.getDownloadNumber();
        this.comment_times=source.getCommentNumber();
        this.collect_times=source.getCollectNumber();
        this.avatar=source.getAvatar();
    }
}
